<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Ajax Framework - <span class="subitem">Partial Process</span>
    </ui:define>

    <ui:define name="description">
        Partial processing enables executing certain components while ignoring others during a request.
    </ui:define>

    <ui:param name="documentationLink" value="/ajax/processing?id=partial-processing" />

    <ui:define name="implementation">
        
        <h:form>		
            <h:panelGrid id="grid" cellpadding="5" columns="2" style="margin-bottom:10px">
                <f:facet name="header">
                    <p:messages id="msgs" />
                </f:facet>

                <p:outputLabel for="firstname" value="Firstname:" />
                <p:inputText id="firstname" value="#{userView.firstname}" />

                <p:outputLabel for="surname" value="Surname:" />
                <p:inputText id="surname" value="#{userView.lastname}" required="true" requiredMessage="Surname is required." />
            </h:panelGrid>

            <h:panelGrid columns="6" cellpadding="5">
                <p:commandButton value="All" id="btnAll" process="@all" update="grid" action="#{userView.save}" />
                <p:commandButton value="Form" id="btnForm" process="@form" update="grid" action="#{userView.save}" />
                <p:commandButton value="This" id="btnThis" process="@this" update="grid" action="#{userView.save}" />
                <p:commandButton value="None" id="btnNone" process="@none" update="grid" action="#{userView.save}" />
                <p:commandButton value="Parent" id="btnParent" process="@parent" update="grid" action="#{userView.save}" />
                <p:commandButton value="This Surname" id="btnSurname" process="@this,surname" update="grid" action="#{userView.save}" />
            </h:panelGrid>
        </h:form>
        
    </ui:define>

</ui:composition>